package models

import (
	"gorm.io/gorm"
)

type User struct {
	ID       uint   `gorm:"primaryKey"`
	Username string `gorm:"unique;not null"`
	Password string `gorm:"not null"`
}

// TableName 方法返回自定义表名
func (User) TableName() string {
	return "users_test"
}

func AutoMigrate(db *gorm.DB) {
	db.AutoMigrate(&User{})
}
